package com.example.villagemarket;

import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;

import android.util.Log;


public class JsonParser
{

    public ArrayList<String> parse(String stringToDecode) throws JSONException
    {
    	ArrayList<String> toReturn = new ArrayList<String>();
    	
    	// Creating a JSONObject from a String 
    	JSONArray nodeRoot  = new JSONArray(stringToDecode); 
    	
    	for(int i = 0; i < nodeRoot.length(); i++)
    	{
    		String temp = nodeRoot.getString(i);
    		
        	toReturn.add(temp);
    	}

    	
    	
    	return toReturn;
    	
    	
        
    }
}